package com.bwie.community.mapper;

import com.bwie.common.domain.VoObserve;
import com.bwie.common.domain.*;
import com.bwie.common.domain.request.CommunityReq;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>ClassName：CommunityMapper</p >
 * <p>Description：</p >
 * <p>Author：liuchang</p >
 * <p>Date：2024/3/24</p >
 */
@Mapper
public interface CommunityMapper {
    Integer publish(Community community);

    List<Dept> findAllDept();

    void addImage(@Param("id") Integer id, @Param("imgList") String[] imgList);

    List<DTOCommunity> search(CommunityReq req);

    DTOObserve findUserInfoByObserveId(@Param("observeId") Integer observeId);

    List<DTOObserve> findObserveListByCid(@Param("cid") Integer cid);

    Integer addComment(VoObserve voObserve);

    VoMessage queryMessageInfo(@Param("observeId") Integer observeId);

    List<Community> findCommunityByUserId(@Param("userId") Integer userId);

    List<ChatHistory> chatHistoryList(@Param("roomId") String roomId);


    void addLog(ChatHistory chatHistory);

}
